def is_prime(num):
    if num < 2:
        return False
    else:
        for i in range(2, int(num ** .5 + 1)):
            if num % i == 0:
                return False, i
        return True

def gen_prime(low, limit):
    primelist = []
    if low < 2:
        low = 2
    for i in range(low,limit+1):
        if i%2 != 0:
            if is_prime(i) == True:
                primelist.append(i)
    if len(primelist) != 0: return primelist
    else: return "There are no primes in this list"

def find_factors(num):
    factors = []
    for i in range(1, num + 1):
        if num % i == 0:
            factors.append(i)
    return factors

def prm_factorize(num):
    denom = 2
    prime_factors = []
    while num != 1:
        if num % denom == 0:
            if is_prime(denom) == True:
                prime_factors.append(denom)
                num = num/denom
                denom = 2
        else: denom += 1
    return prime_factors

def digit_sum(num):
    track = 0
    for i in str(num):
        track += int(i)
    return track

def factorials(num):
    track = 1
    for i in range (2,num+1):
        track *= i
    return track

